import { StorageService } from 'src/app/core/sotrage/storage.service';
import { ApiService, urlService } from 'src/app/core/api';
import { CoreModule } from 'src/app/core/core.module';
import { Injectable } from '@angular/core';

@Injectable({
    providedIn: CoreModule
})
export class MemberService {

    memberPageData:any;

    public  getAJX(url:string, data:any):any{//接口交換
        // let success = this.api.post(urlService('dev', url), data).toPromise();
        let success = this.api.post(urlService('dev', url), data).toPromise().catch(err => this.api.goToWhere(err.status));
        return success;
    };

    public getApiSuccess(data,isShowMsg):boolean{
        return this.api.getData(data,isShowMsg)
    };
    
    

    constructor(
        private storage:StorageService,
        private api: ApiService,
    ) {};
};
